<template>
    <div class="nearCompanyBox">
        <header>
            <i class="iconfont icon-zuojiantou"></i>
        </header>
        <div class="main">
            <h2>工作地点</h2>
            <ul>
                <li>
                    <van-icon name="location-o" />
                </li>
            </ul>
            <h2>出行方式</h2>
            <ul>
                <li v-for="(item, index) in transport" :key="index">
                    <i :class="[item.icon, {active: num == index}]"  @click="num = index"></i>
                    <span>{{item.way}}</span>
                </li>
            </ul>
            <h2>交通时间</h2>
            <ul>
                <li v-for="(item, index) in times" :key="index">
                    <i :class="[time, {active: num1 == index}]"  @click="num1 = index"> {{item}} </i>
                </li>
            </ul>
            <p>立即找房</p>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            num: 0,
            num1: 0,
            time: 'time',
            transport: [
                {
                    icon: "iconfont icon-gongjiaoche",
                    way: "公交"
                },
                {
                    icon: "iconfont icon-car",
                    way: "驾车"
                },
                {
                    icon: "iconfont icon-buxing",
                    way: "步行"
                },
                {
                    icon: "iconfont icon-qihangiconx-",
                    way: "骑行"
                }

            ],
            times: ["15分", "30分", "60分", "90分"]
        }
    }
}
</script>

<style lang="less" scoped>
.nearCompanyBox {
    min-height: 1334px;
    background-color: #ededed;
}
header {
    height: 88px;
    background-color: #ff5654;
    color: #fff;
    i {
        display: inline-block;
        margin-left: 20px;
        line-height: 88px;
        font-size: 36px;
    }
}
.main {
    box-sizing: border-box;
    width: 695px;
    margin: 0 auto;
    margin-top: 60px;
    background-color: #fff;
    border-radius: 8px;
    padding: 60px 84px;
    h2 {
        font-size: 36px;
        color: #7a7a7a;
        text-align: center;
    }
    ul {
        margin-top: 28px;
        display: flex;
        justify-content: center;

        li {
            margin-left: 40px;
            text-align: center;
            /deep/.van-icon ,i{
                display: block;
                width: 84px;
                height: 84px;
                text-align: center;
                line-height: 84pxs;
                border-radius: 50%;
                background-color: #ff5654;
                color: #fff;
                line-height: 84px;
                font-size: 40px;
            }
            span {
                font-size: 24px;
                color: #aca8a9;
            }
            i {
                background-color: #aca8a9;
            }
            .time {
                font-size: 24px;
            }
        }
        .active {
            background-color: #ff5654;
        }
    }
    p {
        width: 560px;
        height: 75px;
        margin: 84px auto 20px;
        background-color: #ff5654;
        text-align: center;
        font-size: 36px;
        line-height: 75px;
        color: #fff;
        border-radius: 8px;
    }
}
</style>